<?php
/**
 * Created by PhpStorm.
 * User: fengzi
 * Date: 2019/6/3
 * Time: 14:34
 */

namespace app\vehicle\logic;
use think\Db;
use app\vehicle\model\UserSignature;
class signatureLogic
{
    public function getSignatureList($user){
        return UserSignature::where([['type_id','eq',1],['user_id','eq',$user['id']]])->order('create_time desc')->select();
    }
    public function addSignature($data,$user){
        $data['user_id'] = $user['id'];
        $data['business_id'] = $user['business_id'];
        $data['create_time'] = time();
        $result = UserSignature::insertGetId($data);
        return $result;
    }
}